package ManyAnimal;

public class Test {

    public static void main(String[] args) {
        Cat cat1 = new Cat("元宝");
        cat1.run();

        Fish fish1 = new Fish("妙妙");
        fish1.swimming();
        fish1.run();

        Duck duck1 = new Duck("小七");
        duck1.fly();
        duck1.run();
        duck1.swimming();

        System.out.println("===========");
        walk(cat1);
        walk(fish1);
        walk(duck1);

    }

    public static void walk(Irunning irunning) {
        System.out.println("我带着伙伴在散步");
        irunning.run();
    }
}
